package com.example.spareparts.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import com.example.spareparts.entity.InventoryReports;
import com.example.spareparts.repository.InventoryReportsRepository;

@Service
public class InventoryReportsService {
    @Autowired
    private InventoryReportsRepository inventoryReportsRepository;
    public List<InventoryReports> findAllInventoryReports(){
        return inventoryReportsRepository.findAllInventoryReports();
    }

    public void insertInventoryReports(InventoryReports inventoryReports){
        inventoryReportsRepository.insertInventoryReports(inventoryReports);
    }

    public void updateInventoryReports(InventoryReports inventoryReports){
        inventoryReportsRepository.updateInventoryReports(inventoryReports);
    }

    public void deleteInventoryReports(Long reportid){
        inventoryReportsRepository.deleteInventoryReports(reportid);
    }
    public InventoryReports findInventoryReportsById(Long reportid){
        return inventoryReportsRepository.findInventoryReportsById(reportid);
    }
    public List<InventoryReports> findInventoryReportsBySparePartId(Long sparepartid){
        return inventoryReportsRepository.findInventoryReportsBySparePartId(sparepartid);
    }
}
